package com.求点数最大;

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	static ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int array[] = { 1, 2, 3, 4, 5, 6 };
		int n = 3;
		if (n == 0) {
			System.out.println(result.size());
		} else {
			ArrayList<Integer> list = new ArrayList<Integer>();
			count(array, 0, n, list);
			System.out.println(result.size());
		}
	}

	public static void count(int[] array, int start, int target, ArrayList<Integer> list) {
		if (target == 0) {
			result.add(new ArrayList(list));
			return;
		}
		if (target < 0)
			return;
		for(int i=1;i<array.length;i++) {
			list.add(i);
			count(array,i,target-array[i],list);
			list.remove(list.size()-1);
		}

	}
}
